-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Clean up interfaceLockMap entries on endpoint deletion #1249
Conversation
…ions Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
…r pacage Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should take this chance to examine whether or not do we even need these |
Signed-off-by: Yerlan Baiturinov <[email protected]>
Yeah, you make a valid point! Since we're processing interfaces sequentially, we can safely remove the mutex mechanism. Let's keep it simple and avoid unnecessary complexity. I've updated the PR to remove the mutex-related code. |
Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
Signed-off-by: Yerlan Baiturinov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved, although I'm still not thoroughly convinced that we need the lock map, I'll not die on this hill for this PR, will let @anubhabMajumdar sign this off
Had a conversation offline to resolve this. Change looks good to me. |
Description
The packetParser was creating entries in interfaceLockMap for each new interface
but failing to remove them when interfaces were deleted. In environments with
high pod counts and frequent churn, this caused a memory leak as the map grew
indefinitely.
Related Issue
Potential memory leak in packetparser's interfaceLockMap #1236
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Solution
Testing
Impact
This fix prevents memory leaks in environments with frequent pod creation/deletion,
improving the overall stability and resource usage of the system.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.